/*
 * Copyright (c) 2014 laidian. All Rights Reserved.
 * @author yaoyuming
 * @date  2020-05-19 15:56
 */
package com.yao.common.util;

import cn.hutool.crypto.SecureUtil;

/**
 * 生成token工具类
 * @author yaoyuming
 * @date 2020/05/19 15:56
 */
public class TokenUtils {

    /**
      * 功能描述 : 生成token
      * @param userName 用户名
      * @author yaoyuming
      * @date 2020/5/19 0019
      * @return {@link String}
      */
    public static String create(String userName){
        String token = "";
        long current = System.currentTimeMillis();
        token = SecureUtil.md5(userName + String.valueOf(current));
        return token;
    }
}